""" 
直流电机控制
"""

# 导入Pin模块
from machine import Pin
import time

dc_motor = Pin(15, Pin.OUT, Pin.PULL_DOWN)
count = 3

print("dc motor start")
while count > 0:
    dc_motor.value(1)
    time.sleep(1)
    dc_motor.value(0)
    time.sleep(1)
    count -= 1

print("dc motor stop")
